Field of the Invention
The present invention relates to autofocus technology in an image capturing apparatus such as a digital camera or a digital video camera.
Description of the Related Art
Contrast autofocus (contrast AF) and phase difference autofocus (phase difference AF) are known as ordinary methods of focus adjustment in an image capturing apparatus. Contrast AF is an AF method often used in a video camera or a digital still camera, and is an AF method in which attention is given to contrast information of an output signal of an image sensor, particularly a high-frequency component, and a focusing lens position where an AF evaluation value of the contrast AF is largest is adopted as an in-focus position.
On the other hand, as phase difference AF using an image sensor, a technique has been proposed in which pupil division of pixels in the image sensor is performed with a microlens, and by receiving light from a subject with the pupil-divided pixels, focus detection is performed at the same time as performing image capturing. In recent years, hybrid AF has also been proposed as a method that takes advantage of the merits of both contrast AF and phase difference AF. In Japanese Patent Laid-Open No. 2010-256824, a focusing lens is driven using results of focus detection in phase difference AF, and by changing to contrast AF in the vicinity of an in-focus position, fast and accurate focus detection is made possible.
Also, technology has been proposed in which these sorts of AF methods are used to focus on the face of a person. An example of contrast AF is disclosed in Japanese Patent Laid-Open No. 2008-197153, for example. Also, as described in Japanese Patent Laid-Open No. 2008-197153, a method is known in which AF is performed only once by a user operation (referred to below as ‘one-shot AF’), and an AF method is known in which control is performed so as to always continue focusing on a subject (referred to below as ‘continuous AF’).
When causing focus to follow the face of a person by the above sort of AF control, there is some variation in results depending on the accuracy of face detection. For example, there are cases where even if the subject is being still, the detection results of the size or position of the face differs between frames depending on changes in luminance or changes in the amount of noise, or the like. Detection variation also occurs when focusing on eyes of a person, and particularly when the person is moving, there are many cases where the detection results of eyes differs between frames due to changes in the direction the face is facing. In such cases, if the above-described face detection result is used as-is for an AF frame, variation also occurs in the AF results, so the desired AF control is not possible.